package com.cf.docker.model;

import com.cf.code.core.CField;
import com.cf.code.core.CModel;
import com.cf.code.core.CPage;
import com.cf.crud.entity.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * boot-awm-Container
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/6/20 下午 02:31
 */
@Entity
@Table(name = "container")
@CModel(pages = {
        @CPage(title = "实例列表", path = "container", templateName = "list.ftl", outPutName = "list.ftl"),
        @CPage(title = "实例", path = "container", templateName = "add.ftl", outPutName = "add.ftl"),
        @CPage(title = "实例", path = "container", templateName = "update.ftl", outPutName = "update.ftl")
})
public class Container extends BaseEntity {

    @Column(name = "machineId")
    @CField(lab = "物理机", type = "select")
    private long machineId;

    @Column(name = "imgId")
    @CField(lab = "镜像Id", type = "select")
    private long imgId;

    @Column(name = "imgName")
    @CField(lab = "镜像名字")
    private String imgName;

    @CField(lab = "启动参数")
    @Column(name = "cmdParameter")
    private String cmdParameter;

    @CField(lab = "容器Id")
    @Column(name = "containerId")
    private String containerId;

    @CField(lab = "运行状态")
    @Column(name = "runState")
    private boolean runState;

    public long getMachineId() {
        return machineId;
    }

    public void setMachineId(long machineId) {
        this.machineId = machineId;
    }

    public String getContainerId() {
        return containerId;
    }

    public void setContainerId(String containerId) {
        this.containerId = containerId;
    }

    public long getImgId() {
        return imgId;
    }

    public void setImgId(long imgId) {
        this.imgId = imgId;
    }

    public String getImgName() {
        return imgName;
    }

    public void setImgName(String imgName) {
        this.imgName = imgName;
    }

    public String getCmdParameter() {
        return cmdParameter;
    }

    public void setCmdParameter(String cmdParameter) {
        this.cmdParameter = cmdParameter;
    }

    public boolean isRunState() {
        return runState;
    }

    public void setRunState(boolean runState) {
        this.runState = runState;
    }
}
